Optimal. Leaf size=61 \[ -\frac {2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {c} \cos (e+f x)}{\sqrt {a+a \sin (e+f x)} \sqrt {c+d \sin (e+f x)}}\right )}{\sqrt {c} f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.13, antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.057, Rules used = {3022, 212}
\begin {gather*} -\frac {2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {c} \cos (e+f x)}{\sqrt {a \sin (e+f x)+a} \sqrt {c+d \sin (e+f x)}}\right )}{\sqrt {c} f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 3022
Rubi steps
\begin {align*} \int \frac {\csc (e+f x) \sqrt {a+a \sin (e+f x)}}{\sqrt {c+d \sin (e+f x)}} \, dx &=-\frac {(2 a) \text {Subst}\left (\int \frac {1}{1-a c x^2} \, dx,x,\frac {\cos (e+f x)}{\sqrt {a+a \sin (e+f x)} \sqrt {c+d \sin (e+f x)}}\right )}{f}\\ &=-\frac {2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {c} \cos (e+f x)}{\sqrt {a+a \sin (e+f x)} \sqrt {c+d \sin (e+f x)}}\right )}{\sqrt {c} f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 2.94, size = 367, normalized size = 6.02 \begin {gather*} -\frac {\left (\log \left (-\frac {(1+i) e^{\frac {i e}{2}} \left (\sqrt {2} c \left (-1+e^{i (e+f x)}\right )+i \sqrt {2} d \left (1+e^{i (e+f x)}\right )-2 i \sqrt {c} \sqrt {2 c e^{i (e+f x)}-i d \left (-1+e^{2 i (e+f x)}\right )}\right ) f}{\sqrt {c} \left (1+e^{i (e+f x)}\right )}\right )+\log \left (\frac {(1+i) e^{\frac {i e}{2}} \left (-i \sqrt {2} d \left (-1+e^{i (e+f x)}\right )+\sqrt {2} c \left (1+e^{i (e+f x)}\right )+2 \sqrt {c} \sqrt {2 c e^{i (e+f x)}-i d \left (-1+e^{2 i (e+f x)}\right )}\right ) f}{\sqrt {c} \left (-1+e^{i (e+f x)}\right )}\right )\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )-i \sin \left (\frac {1}{2} (e+f x)\right )\right ) \sqrt {a (1+\sin (e+f x))} \sqrt {(\cos (e+f x)+i \sin (e+f x)) (c+d \sin (e+f x))}}{\sqrt {c} f \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \sqrt {c+d \sin (e+f x)}} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(237\) vs.
\(2(49)=98\).
time = 20.06, size = 238, normalized size = 3.90
method | result | size |
default | \(\frac {\sqrt {a \left (1+\sin \left (f x +e \right )\right )}\, \sqrt {c +d \sin \left (f x +e \right )}\, \sqrt {2}\, \left (\ln \left (-\frac {-\sqrt {c}\, \sqrt {2}\, \sqrt {\frac {c +d \sin \left (f x +e \right )}{1+\cos \left (f x +e \right )}}\, \sin \left (f x +e \right )+\cos \left (f x +e \right ) c -d \sin \left (f x +e \right )-c}{\sin \left (f x +e \right ) \sqrt {c}}\right )-\ln \left (\frac {-2 \sqrt {c}\, \sqrt {2}\, \sqrt {\frac {c +d \sin \left (f x +e \right )}{1+\cos \left (f x +e \right )}}\, \sin \left (f x +e \right )+2 d \cos \left (f x +e \right )-2 c \sin \left (f x +e \right )-2 d}{-1+\cos \left (f x +e \right )}\right )\right ) \left (-1+\cos \left (f x +e \right )\right )}{f \sin \left (f x +e \right ) \left (-1+\cos \left (f x +e \right )-\sin \left (f x +e \right )\right ) \sqrt {\frac {c +d \sin \left (f x +e \right )}{1+\cos \left (f x +e \right )}}\, \sqrt {c}}\) | \(238\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 179 vs.
\(2 (52) = 104\).
time = 0.90, size = 1080, normalized size = 17.70 \begin {gather*} \left [\frac {\sqrt {\frac {a}{c}} \log \left (\frac {{\left (a c^{4} - 28 \, a c^{3} d + 70 \, a c^{2} d^{2} - 28 \, a c d^{3} + a d^{4}\right )} \cos \left (f x + e\right )^{5} + a c^{4} + 4 \, a c^{3} d + 6 \, a c^{2} d^{2} + 4 \, a c d^{3} + a d^{4} - {\left (31 \, a c^{4} - 196 \, a c^{3} d + 154 \, a c^{2} d^{2} - 4 \, a c d^{3} - a d^{4}\right )} \cos \left (f x + e\right )^{4} - 2 \, {\left (81 \, a c^{4} - 252 \, a c^{3} d + 150 \, a c^{2} d^{2} - 28 \, a c d^{3} + a d^{4}\right )} \cos \left (f x + e\right )^{3} + 2 \, {\left (79 \, a c^{4} - 100 \, a c^{3} d + 74 \, a c^{2} d^{2} - 4 \, a c d^{3} - a d^{4}\right )} \cos \left (f x + e\right )^{2} - 8 \, {\left ({\left (c^{4} - 7 \, c^{3} d + 7 \, c^{2} d^{2} - c d^{3}\right )} \cos \left (f x + e\right )^{4} + 51 \, c^{4} - 59 \, c^{3} d + 17 \, c^{2} d^{2} - c d^{3} - 2 \, {\left (5 \, c^{4} - 14 \, c^{3} d + 5 \, c^{2} d^{2}\right )} \cos \left (f x + e\right )^{3} - 2 \, {\left (18 \, c^{4} - 33 \, c^{3} d + 12 \, c^{2} d^{2} - c d^{3}\right )} \cos \left (f x + e\right )^{2} + 2 \, {\left (13 \, c^{4} - 14 \, c^{3} d + 5 \, c^{2} d^{2}\right )} \cos \left (f x + e\right ) - {\left (51 \, c^{4} - 59 \, c^{3} d + 17 \, c^{2} d^{2} - c d^{3} - {\left (c^{4} - 7 \, c^{3} d + 7 \, c^{2} d^{2} - c d^{3}\right )} \cos \left (f x + e\right )^{3} - {\left (11 \, c^{4} - 35 \, c^{3} d + 17 \, c^{2} d^{2} - c d^{3}\right )} \cos \left (f x + e\right )^{2} + {\left (25 \, c^{4} - 31 \, c^{3} d + 7 \, c^{2} d^{2} - c d^{3}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )\right )} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {d \sin \left (f x + e\right ) + c} \sqrt {\frac {a}{c}} + {\left (289 \, a c^{4} - 476 \, a c^{3} d + 230 \, a c^{2} d^{2} - 28 \, a c d^{3} + a d^{4}\right )} \cos \left (f x + e\right ) + {\left (a c^{4} + 4 \, a c^{3} d + 6 \, a c^{2} d^{2} + 4 \, a c d^{3} + a d^{4} + {\left (a c^{4} - 28 \, a c^{3} d + 70 \, a c^{2} d^{2} - 28 \, a c d^{3} + a d^{4}\right )} \cos \left (f x + e\right )^{4} + 32 \, {\left (a c^{4} - 7 \, a c^{3} d + 7 \, a c^{2} d^{2} - a c d^{3}\right )} \cos \left (f x + e\right )^{3} - 2 \, {\left (65 \, a c^{4} - 140 \, a c^{3} d + 38 \, a c^{2} d^{2} - 12 \, a c d^{3} + a d^{4}\right )} \cos \left (f x + e\right )^{2} - 32 \, {\left (9 \, a c^{4} - 15 \, a c^{3} d + 7 \, a c^{2} d^{2} - a c d^{3}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{\cos \left (f x + e\right )^{5} + \cos \left (f x + e\right )^{4} - 2 \, \cos \left (f x + e\right )^{3} - 2 \, \cos \left (f x + e\right )^{2} + {\left (\cos \left (f x + e\right )^{4} - 2 \, \cos \left (f x + e\right )^{2} + 1\right )} \sin \left (f x + e\right ) + \cos \left (f x + e\right ) + 1}\right )}{4 \, f}, \frac {\sqrt {-\frac {a}{c}} \arctan \left (-\frac {{\left ({\left (c^{2} - 6 \, c d + d^{2}\right )} \cos \left (f x + e\right )^{2} - 9 \, c^{2} + 6 \, c d - d^{2} + 8 \, {\left (c^{2} - c d\right )} \sin \left (f x + e\right )\right )} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {d \sin \left (f x + e\right ) + c} \sqrt {-\frac {a}{c}}}{4 \, {\left ({\left (a c d - a d^{2}\right )} \cos \left (f x + e\right )^{3} - {\left (a c^{2} - 3 \, a c d\right )} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + {\left (2 \, a c^{2} - a c d + a d^{2}\right )} \cos \left (f x + e\right )\right )}}\right )}{2 \, f}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {a \left (\sin {\left (e + f x \right )} + 1\right )}}{\sqrt {c + d \sin {\left (e + f x \right )}} \sin {\left (e + f x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {\sqrt {a+a\,\sin \left (e+f\,x\right )}}{\sin \left (e+f\,x\right )\,\sqrt {c+d\,\sin \left (e+f\,x\right )}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________